#pragma GCC optimize(2, "Ofast", "inline")
#include <iostream>
#include <vector>
#include <map>
#include <cmath>
#include <set>
#include <queue>
#include <stack>
#include <list>
#include <unordered_map>
#include <algorithm>
#define endl '\n'
#define int long long
#define pii pair<int, int>
#define fi first
#define se second
#define int128 __int128_t
using namespace std;

// 已知
int n;
pair<char, int> a[100005];
signed main()
{
    cin.tie(0)->sync_with_stdio(0);
    cin >> n;
    int cnt = 0;
    for (int i = 0;i < n;i++)
    {
        cin >> a[i].first >> a[i].second;
        cnt += a[i].second;
        if (cnt > 100)
        {
            cout << "Too Long";
         exit(0);
        }       
    }
    for (int i = 0;i < n;i++)
    {
        for (int j = 0;j < a[i].second;++j)
        {
            cout << a[i].first;
        }
    }

    return 0;
}

